package com.powernode.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SysController {
    @PreAuthorize("hasAuthority('sys:save')")
    @GetMapping("/save")
    public String save() {
        return "创建成功";
    }
    @PreAuthorize("hasAuthority('sys:select')")
    @GetMapping("/select")
    public String select() {
        return "查询成功";
    }
}
